import request from "@/utils/request";

/**
 * 获取客服列表 分页
 */
export function getServiceList(params) {
    return request({
        url: "/customer/service/page/list",
        method: "post",
        data: params
    });
}

/**
 * 删除客服
 */
export function deleteServiceInfo(params) {
    return request({
        url: `/customer/service/delete/${params.id}`,
        method: "get"
    });
}


/**
 * 新增客服
 */
export function addServiceInfo(params) {
    return request({
        url: `/customer/service/add`,
        method: "post",
        data: params
    });
}

/**
 * 编辑客服
 */
export function updateServiceInfo(params) {
    return request({
        url: `/customer/service/update`,
        method: "post",
        data: params
    });
}


/**
 * 获取优惠卷 分页
 */
export function getCouponList(params) {
    return request({
        url: "/coupon/config/page/list",
        method: "post",
        data: params
    });
}

/**
 * 删除优惠卷
 */
export function deleteCouponInfo(params) {
    return request({
        url: `/coupon/config/delete/${params.id}`,
        method: "get"
    });
}


/**
 * 新增优惠卷
 */
export function addCouponInfo(params) {
    return request({
        url: `/coupon/config/add`,
        method: "post",
        data: params
    });
}

/**
 * 编辑优惠卷
 */
export function updateCouponInfo(params) {
    return request({
        url: `/coupon/config/update`,
        method: "post",
        data: params
    });
}